var timeBox = document.querySelector('.nowTime');
var time;
time = new Date().toLocaleString();
timeBox.innerText = time;

setInterval(() => {
  time = new Date().toLocaleString();
  timeBox.innerText = time;
}, 1000);
// 动态时间